Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Publish docker #166

Merged
merged 20 commits into from
Oct 3, 2024
Merged

feat: Publish docker #166

merged 20 commits into from
Oct 3, 2024

Conversation

AverageHelper
Copy link
Contributor

@AverageHelper AverageHelper commented Aug 24, 2024

We might as well publish our own Docker image. Would make deployment much easier if a host could simply write ghcr.io/byu-cs-discord/csbot in a compose.yml file, without having to clone and build directly.

New Docker deploy flow:

  • Every push to our main branch goes to an image tag called main
  • Every new SemVer repo tag goes to an image tag called x.x.x, x.x, x, and latest
  • latest is equivalent to the newest SemVer tag, while main is equivalent to the main branch
  • Latest SemVer image can be pulled from ghcr.io/byu-cs-discord/csbot:latest
  • We might additionally publish to our Codeberg mirror the same way, once I know this proof-of-concept works and I figure out how to matrix the secret key

Startup time is a bit slow during command deployment, but we can speed that up later with a smarter deployment solution (one that edits existing commands rather than strict redeploying, which I think would fix the issue with command permissions resetting each time).

Note also that we run database migrations on startup, too.

@AverageHelper AverageHelper added the enhancement New feature or request label Aug 24, 2024
@AverageHelper AverageHelper requested a review from a team August 24, 2024 23:13
@AverageHelper AverageHelper self-assigned this Aug 24, 2024
@AverageHelper AverageHelper enabled auto-merge (squash) August 24, 2024 23:19
@AverageHelper AverageHelper mentioned this pull request Aug 25, 2024
@AverageHelper AverageHelper requested a review from a team September 6, 2024 19:58
@AverageHelper AverageHelper enabled auto-merge (squash) September 6, 2024 20:01
@AverageHelper
Copy link
Contributor Author

Ok I think it's done now lol. Pending new reviews

JstnMcBrd
JstnMcBrd previously approved these changes Oct 3, 2024
Dockerfile Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
@AverageHelper AverageHelper requested review from a team and JstnMcBrd October 3, 2024 18:06
Copy link
Contributor

@JstnMcBrd JstnMcBrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excited to see this work when we release v0.13.0!

@AverageHelper AverageHelper merged commit 38d87bb into main Oct 3, 2024
2 checks passed
@AverageHelper AverageHelper deleted the avg/publish-docker branch October 3, 2024 18:39
@AverageHelper
Copy link
Contributor Author

AverageHelper commented Oct 3, 2024

Looks like the package was marked private lol, but now that's fixed and I've confirmed that the ghcr.io/byu-cs-discord/csbot:main image works! Once #165 merges then we should have semver tags and :latest as well!!

EDIT: Well something went wrong idk what lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants